﻿using DevelopTool.Model.CommonModels;
using DevelopTool.Model.Enums;
using LiteDB;

namespace DevelopTool.Model.DbModels
{
    /// <summary>
    /// 数据库连接实体
    /// </summary>
    public class DbInfo : ManageMenu
    {
        #region 数据库用属性

        /// <summary>
        /// 数据库类型
        /// </summary>
        public DbType DbType { get; set; }


        /// <summary>
        /// 数据库ip地址（Oracle包含服务名）
        /// </summary>
        public string Ip { get; set; }

        /// <summary>
        /// 数据库用户名/实例名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 数据库密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 数据库端口号
        /// </summary>
        public string Port { get; set; }

        /// <summary>
        /// 数据库连接字符串
        /// </summary>
        public string ConnectionString { get; set; }

        #endregion        


        /// <summary>
        /// 当前实例
        /// </summary>
        [BsonIgnore]
        public string DataBase { get; set; }
    }
}
